package pl.squeaky.mvc.nature.wizard;

import org.eclipse.core.resources.IProject;
import org.eclipse.jface.wizard.Wizard;

public class MvcWizard extends Wizard {
	String controllerPath;
	String modelPath;
	String viewPath;
	
	IProject project;
	private MvcPathsPage pathsPage;
	

	public MvcWizard(IProject project) {
		setWindowTitle("Add MVC support");
		
		this.project = project;
	}
	
	@Override
	public void addPages() {
		pathsPage = new MvcPathsPage(project);
		addPage(pathsPage);
	}
	
	@Override
	public boolean performFinish() {
		controllerPath = pathsPage.getControllerPath();
		modelPath = pathsPage.getModelPath();
		viewPath = pathsPage.getViewPath();
		
		return !pathsPage.getControllerPath().isEmpty();
	}

	public String getControllerPath() {
		return controllerPath;
	}

	public String getModelPath() {
		return modelPath;
	}

	public String getViewPath() {
		return viewPath;
	}

}
